package com.frejoys.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frejoys.dao.entity.AgentStore;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AgentStoreMapper extends BaseMapper<AgentStore>{
    @Select("select count(*) from j_agent_store where store_user_id = #{userId}")
    Integer getCount(@Param("userId") Long userId);

    // 代理用户 管理店铺数量
    @Select("select count(1) from j_agent_store where agent_user_id = #{userId}")
    Integer storeCount(@Param("userId") Long userId);
}
